package com.jwell.cargoapp.ui.base

import android.content.DialogInterface
import android.os.Bundle

/**
 * 基础View
 */
interface IBaseView {
    //显示进度条
    fun showProgress(message: String, outIsTouch: Boolean)

    //隐藏进度条
    fun hideProgress()

    //显示dialog
    fun showDialog(message: String, ensureListener: DialogInterface.OnClickListener?, cancelListener: DialogInterface.OnClickListener?)

    //隐藏dialog
    fun hideDialog()

    //跳往主界面
    fun skipToMain(bundle: Bundle?)

    /**
     * 跳往登录界面
     * @param finsh 当前界面是否结束
     */
    fun skipToLogin(finsh: Boolean)

    //弹出toast
    fun toast(message: String)

}